<!DOCTYPE html>
<html lang="en">
<head>
  <style type="text/css">
    #box1{
        width: 200px;
        height: 200px;
        background-color: red;
        border: 1px solid black;
        /* div开启定位 */
        position: absolute;
    }
  </style>
  <script type="text/javascript">
    window.onload = function(){
      var box1 = document.getElementById("box1");
      // 鼠标移动事件
      document.onmousemove = function(event){
      }
    }
  </script>
</head>
<body>
  <div id="box1"></div>
</body>
</html>